{extend name="public:_base" /}
{block name="js"}
<script >
    $(function () {
        $("[name='pid']").find("[value='{$data.pid ?? ''}']").attr("selected", true);
    });
</script>
{/block}
{block name="main"}
<div class="page-container">

    <form action="{:url('JobCate/save')}" method="post" class="form form-horizontal"
          id="form">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                分类：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <select name="pid" class="select">
                    <option value="0">一级分类</option>
                    {volist name="getall" id="vo"}
                        <option value="{$vo.id}" >{$vo['level']}{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">
                <span class="c-red">*</span>
                分类名称：</label>
            <div class="formControls col-xs-9 col-sm-9">
                <input type="text" class="input-text" value="{$data.name ?? ''}" placeholder="" id="user-name"
                       name="name">
            </div>
        </div>
        <div class="row cl">
            <div class="col-9 col-offset-2">
                <input name="id" value="{$data.id ?? ''}" type="hidden">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</div>
{/block}
